chcp 65001
@echo off
:Main
cls&
echo X X X X X X X X X X X X X X X X X X X X X X X X
echo X X X X X X X X X X X X X X X X X X X X X X X X
echo X X                                         X X 
echo X X               Informations              X X
echo X X   -----------------------------------   X X
echo X X         Author: Michael D. Han          X X 
echo X X           Date: 2019/11/23              X X 
echo X X        Version: 1.6.8                   X X 
echo X X        Service: Miluo                   X X 
echo X X                                         X X 
echo X X X X X X X X X X X X X X X X X X X X X X X X
echo X X                                         X X  
echo X X               Sevices Menu              X X
echo X X   -----------------------------------   X X
echo X X        c. start Git checkout            X X
echo X X        m. start Git merge               X X
echo X X        p. start Git push                X X
echo X X        q. quit Bat                      X X
echo X X                                         X X 
echo X X X X X X X X X X X X X X X X X X X X X X X X
echo X X X X X X X X X X X X X X X X X X X X X X X X

set choice=&echo,&set /p choice=Please select a charactor and enter: 

if "%choice%"=="c" goto Checkout
if "%choice%"=="m" goto Merge
if "%choice%"=="p" goto Push
if "%choice%"=="q" goto Quit
goto Main

:Checkout
@echo off
echo Starting Git checkout...
echo 当前目录是：%cd%
set /p branch=分支名:
git checkout -b %branch%
git branch
pause
goto Quit

:Push
@echo off
echo Starting Git push...
echo 当前目录是：%cd%
git add .
set /p branch=分支名:
git commit -m "完成了 %branch% 模块的开发"
git pull origin %branch% --allow-unrelated-histories 
git push -u origin %branch%
git branch
pause
git checkout master
pause
goto Main

git checkout master

:Merge
@echo off
echo Starting Git merge...
echo 当前目录是：%cd%
git branch
pause
git merge %branch%
git push
git branch -d %branch%
pause
goto Main

:Quit
exit
